#ifndef _IOPORT_H
#define _IOPORT_H

//-------------------------------------------------------------------
/* port address for v853 */
#define GPIO_BASE 0x02000000

#define PA_CFG0 GPIO_BASE + 0x0
#define PA_CFG1 GPIO_BASE + 0x4
#define PA_CFG2 GPIO_BASE + 0x8
#define PA_DAT  GPIO_BASE + 0x10
#define PC_CFG0 GPIO_BASE + 0x60
#define PC_CFG1 GPIO_BASE + 0x64
#define PC_DAT  GPIO_BASE + 0x70
#define PD_CFG0 GPIO_BASE + 0x90
#define PD_CFG1 GPIO_BASE + 0x94
#define PD_CFG2 GPIO_BASE + 0x98
#define PD_DAT  GPIO_BASE + 0xA0
#define PE_CFG0 GPIO_BASE + 0xC0
#define PE_CFG1 GPIO_BASE + 0xC4
#define PE_CFG2 GPIO_BASE + 0xC8
#define PE_DAT  GPIO_BASE + 0xD0
#define PF_CFG  GPIO_BASE + 0xF0
#define PF_DAT  GPIO_BASE + 0x100
#define PG_CFG  GPIO_BASE + 0x120
#define PG_DAT  GPIO_BASE + 0x130
#define PH_CFG0 GPIO_BASE + 0x150
#define PH_CFG1 GPIO_BASE + 0x154
#define PH_DAT  GPIO_BASE + 0x160
#define PH_PUD  GPIO_BASE + 0x174
#define PI_CFG GPIO_BASE + 0x180
#define PI_DAT  GPIO_BASE + 0x190

//-------------------------------------------------------------------

#define UART_BASE 0x02500000

#define UART_RBR (UART_BASE + 0x00 )
#define UART_THR (UART_BASE + 0x00 )
#define UART_DLL (UART_BASE + 0x00 )
#define UART_DLH (UART_BASE + 0x04 )
#define UART_IER (UART_BASE + 0x04 )
#define UART_DLM (UART_BASE + 0x04 )
#define UART_IIR (UART_BASE + 0x08 )
#define UART_FCR (UART_BASE + 0x08 )
#define UART_LCR (UART_BASE + 0x0C )
#define UART_MCR (UART_BASE + 0x10 )
#define UART_LSR (UART_BASE + 0x14 )
#define UART_MSR (UART_BASE + 0x18 )
#define UART_SCH (UART_BASE + 0x1C )
#define UART_USR (UART_BASE + 0x7C )

//-------------------------------------------------------------------

extern void PUT32 ( unsigned int, unsigned int );
extern unsigned int GET32 ( unsigned int );
extern void DELAY ( unsigned int );



#endif /* _IOPORT_H */
